home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
bbs
/
setr180.zip
/
SETR180.DOC
< prev
next >
Wrap
Text File
|
1997-06-07
|
26KB
|
558 lines
Squish EchoMail Traffic Report - SETR Version 1.80
Copyright 1996 -1997 by Don Ludington - ALL RIGHTS RESERVED
DAL Software Designs - Jun 1997
Introduction
------------
SETR was a fairly simple program that counts up the number of echomail
messages received/sent by your system using the Squish echomail processor,
and then creates an echomail traffic report. It has grown to a rather
complex program that also maintains a history of the logs scanned, and will
produce a history report, as well.
I was using STATSQ by David Laurent for a long time, until I discovered a
few problems with it not accurately counting the messages, and started
looking for something more accurate. I started testing every program that
I could find to report on the mail traffic passing thru my system. I
tested SETS200, by R.J. Ross, but the graphics in it made the reports
difficult to import directly into messages, and it's 2 column report gave
no percentages. It also didn't report on the traffic by node address,
which I liked about STATSQ. Then I found SQREPORT by Bob Rakov, and
although it created a very detailed report, it was much too large, and had
to be chopped into pieces to be imported to a message, it also failed to
properly report dupes.
I then decided to try my hand at writing my own program to handle the
message traffic reports. I took the report format from STATSQ, the
progress screen from SETS200, and started coding SETR. I gave copies to
some others who were running SQUISH on their system, and kept working on
the code. The final result is SETR.
History
-------
Version 1.00
First working version, but it choked on large logs, and died a very
ungraceful death.
Version 1.10
Reworked the file size problem, and added the progress screen. Still slow
on the sorting, but the program would run on a month's worth of logs.
Version 1.20
Rewrote the sorting code, and added percentages to the report. SETR would
now report the percentages of traffic by echo and the origin address.
Version 1.30
Added the /AP and /KL command switches. This would allow you to append
your reports into a single file, and gave you the option to delete the
log file when the report was completed.
Version 1.40 - 1.45
Added the history file creation, updating, and reporting code. SETR would
now keep a running history of it's reports, print a History Report, and
kill the history files on the fly, if you so desired. Multiple history
files could now be maintained making multiple reports easy to manage.
Debugging of the history reporting code took longer than expected, and
version 1.50 was created. Versions 1.40 - 1.45 were never released.
Version 1.50
I rewrote all of the code to optimize speed. The program now loaded the
files in one gulp, and sorted in memory. In testing, a month's worth of
logs could be processed in 51 seconds on my test system, compared to 2
minutes 8 seconds for version 1.40. SETR now requires more memory as all
of the sorting, and much of the parsing/consolidating is done in memory.
SETR will now create and update an error log (SETR.ERR) if any problem is
encountered during the processing. I also added some code to handle the
registration key when it is received. When the registration key is added
to the program, it updates the SETR.EXE file, so that there is no need to
keep the key file on the disk. I also added the /RH switch to allow SETR
to read an external header file to add to the report headers.
Version 1.60
SETR will now look for and use, if they exist, SETR.XCL AND SETR.HDR. There
will be no error report if either of these files can't be found, or are
empty. Fixed a bug in the daily report computations; it now uses long
integers. Added /HA switch to allow the history reports to be appended to
each other. This should allow for unattended operation periods to be more
than the reporting period. And all switches and options that ask for a
file name will now append the default extension if no extension is on the
command line. Also added some consolidation of the data being parsed from
the log as the parsing is being performed. This will allow SETR to process
larger logs, but there is a limit as to how large a log SETR can handle in
one chunk. See the section on limitations for more info on processing
large log files. Fixed a bug that would cause SETR to abort if there was
no origin information in the log. This would only occur if all mail
processed in the log being scanned was locally entered mail, which while
not very likely over the course of a day, could happen, and has been fixed.
Thanks to Joe Negron for reporting that bug.
Version 1.70
Added the /I and /Y options to enable tag inclusion files in SETR. By
doing so I had to remove the default tag exclusion file usage, so SETR no
longer uses SETR.XCL as the default tag exclusion file. To include or
exclude tags you must use an option on the command line. Added a routine
to check for the amount of free memory available before SETR tries to sort
the areatags. If there isn't enough free memory, SETR will abort and
report the condition in it's error log. Your option then is to break the
log down into chunks for processing. Added error checking routines for all
filenames entered from the command line. If the filename entered exceeds
the 12-character DOS standard, SETR will not run, and will report the error
in it's error log.
Version 1.80
Added /RF option to enable footer files to be added to the report. SETR
will now look for and use SETR.FTR as the footer if it exist. There will
be no error if the file isn't found or is empty. Also the contents of the
footer file are appended to the reports as is! There is no trimming or
centering done. Added the memory checking routine to the origin sorting
routine just as a safety, and modified both memory checking routines to
have SETR report any errors in the SETR.ERR log.
License, Warranty, Disclaimer and Distribution
----------------------------------------------
I'll keep this part short and sweet, and dispense with the legal-ese:
License: You are allowed to use SETR for 30 days, after which you must
either register SETR or stop using it completely. SETR registration is a
license for your use of SETR. I retain ownership of the software. A
single registration applies to a single BBS system, regardless of the
number of computers used in the system.
Warranty: There isn't one. The only thing I'll guarantee is that SETR will
take up disk space, and will disappear when deleted.
Disclaimer: I'm not responsible for anything bad that happens. SETR works
here, but I cannot be held responsible for it not working on your computer
or doing any damage to hardware or software.
Distribution: SETR is copyrighted material by Don Ludington. You are given
permission to reproduce and distribute the shareware distribution archive
(ZIP, ARJ, or whatever format it's in), as long as the original contents
are NOT altered in ANY way. You may NOT charge for the distribution of
this file other than a disk duplication & postage charge. You may NOT add,
remove, or modify files from the original archive created by Don Ludington.
If these terms aren't agreeable with you, then the best thing to do is
delete SETR right now. I'll do my best to help any user (registered or
not) that wants to use SETR, and I'll act on bug reports quickly, but I
cannot and will not be held responsible for anything bad, like lost data,
disk crashes, or whatever else you can think of.
Using SETR
----------
To run SETR, simply copy the SETR.EXE onto your hard disk, and enter "SETR"
from the directory where the SQUISH.LOG file is. As long as the SETR.EXE
is in the path, it will produce SETR.RPT in the current directory.
By default, with no command line switches or options, SETR will scan the
SQUISH.LOG in the current directory producing SETR.RPT in the current
directory, with no history updating or reporting at all.
Limitations and Memory Requirements
-----------------------------------
SETR v1.80 will now check to see if enough memory is free to complete the
processing, and report in it's error log if there is a shortage of memory.
It is unlikely this should ever occur, but is included to assist those
that do have large logs to scan.
SETR uses approximately 75K of memory for the program and variables. The
rest of base memory will be used for compiling the report data until SETR
exceeds the limits of your system.
First run: MEM /C, and look at the line below:
Largest executable program size 641,280 (626K)
Next subtract 75K from the number above:
626K - 75K = 551K or about 564,224 bytes (551 * 1024).
Next run: FIND /C "Toss=" SQUISH.LOG, and look at the line below:
---------- SQUISH.LOG: 17282
To see if SETR can handle your log, multiply the number reported by the
FIND command by 32. If the answer is less than the results in step 2
above, you should have no problem with SETR. Example:
17282 * 32 = 553,024, Step 2 = 564,224. SETR should run ok.
If the results are close, try running SETR anyway, as there is some
consolidation done during the parsing process, and it may be able to handle
the log. If "ERROR 07 in module SETR" occurs, the only solution is to
break the log in chunks, and process it using the history reporting
functions like so:
SETR LOG=LOG1 HST=BIGLOG /HU
SETR LOG=LOG2 HST=BIGLOG /HU /HR /HK
Repeat the process above as many times as needed to get the chunks small
enough to process. On my system, it takes more than 2 months worth of logs
in a single file to cause SETR to run out of memory.
Command Line Options and Switches
---------------------------------
SETR has several command line options and switches that control the files
that SETR will use or create and the way SETR will run.
/? Switch
---------
This one is self-explanatory, and tells SETR to display a help screen
containing a brief explanation of the options and switches.
/AP Switch
----------
The /AP switch tells SETR to APPEND the current report to the existing
report file rather than overwriting the old report. This can be handy for
making a running daily report of the traffic on your system.
/KL Switch
----------
The /KL switch tells SETR to delete or kill the log file being scanned
after the processing is completed. This was added for those that want to
use SETR to consolidate the SQUISH.LOG into a compact report, and are then
done with the log file. If any fatal error occurs during the processing,
SETR will not delete the log file to allow you the check the error log,
and decide if the log file is needed or not.
LOG= Option
-----------
LOG=filename<.ext> will allow you to scan the SQUISH.LOG regardless of the
name that your system uses to store the SQUISH.LOG. It will also come in
handy if you happen to rename your logs to something else for ease of
storage. This argument must contain a minimum of the full filename<.ext>
of the log to be scanned, but can be the full Drive:\Path\Filename<.ext>,
if desired. If no .ext is given, .LOG will be used!
If the LOG= option is used, the file named MUST exist or SETR will abort!
RPT= Option
-----------
RPT=filename<.ext> will allow you to make SETR create the report under any
filename, or in any directory. This again can come in handy for scanning
older logs and creating back reports. It also can come in handy for
breaking the reports down by the various nets that you process on your
system. This argument must contain a minimum of the full filename<.ext> of
the report to be created, or the full Drive:\Path\Filename<.ext> if
desired. If no .ext is given, .RPT will be used!
Customizing the Report
----------------------
By default, SETR will look for a SETR.HDR file in the current directory,
and if found, use it while producing the SETR.RPT and SQHIST.RPT reports.
This will allow you to identify your system in the header of the reports,
making it easier to use an automatic message poster to post the reports to
messages.
SETR will also look for a SETR.FTR file in the current directory, and if
found, use it while producing the SETR.RPT and SQHIST.RPT reports. This
will allow you to add comments to the bottom of the reports, again making
it easier to use an automatic message poster to post the reports to
messages.
The lines in the external header file are read in, trimmed of any leading
or trailing blanks, and then printed to the report with centering. Note
that there is no limit on the number of lines that can be added to the
header.
The lines in the external footer file are read in, trimmed of any leading
or trailing blanks, and then printed to the report without centering. Note
that there is no limit on the number of lines that can be added to the
footer.
Example if SETR.HDR doesn't exist:
SETR produces the following header in the reports.
Squish EchoMail Traffic Report
For 01 Jul 96
Example if SETR.HDR does exist:
SETR produces the following header in the reports.
Squish EchoMail Traffic Report
The Rebel's Yell BBS - FidoNet 1:2215/118
For 01 Jul 96
The SETR.HDR file contains the following in the above example:
The Rebel's Yell BBS - FidoNet 1:2215/118
/RHfilename<.ext> Option
------------------------
The /RH option tells SETR to read and use an alternate external header file
while producing the SETR.RPT and SQHIST.RPT report files. This will allow
you to use a custom header for each report that you generate. The /RH
option can contain the full filename of the header file in the current
directory, or the complete path and name for the header file. If no .ext
is given, .HDR will be used!
If the /RH option is used, the file named MUST exist or SETR will abort!
/RFfilename<.ext> Option
------------------------
The /RF option tells SETR to read and use an alternate external footer file
while producing the SETR.RPT and SQHIST.RPT report files. This will allow
you to use a custom footer for each report that you generate. The /RF
option can contain the full filename of the footer file in the current
directory, or the complete path and name for the footer file. If no .ext
is given, .FTR will be used!
If the /RF option is used, the file named MUST exist or SETR will abort!
Excluding and Including AreaTags
--------------------------------
By default, SETR will report on all traffic in your SQUISH.LOG.
But SETR can use a "Tag Exclusion File" to exclude the echo tags from the
report. This file is a plain text file that you can create with any text
editor. It contains one echo tag that you want to exclude for each line of
the file. The lines in this file can be commented out by placing a ";" in
column 1 of that line. There is a 1000 uncommented line limit on the
exclusion list, and if the 1000 line limit is exceeded, SETR will report
the error, but complete the processing using the first 1000 lines only.
Any AreaTag listed in the exclusion file will not be reported!
Example SETR.XCL contains:
BAD_MSGS
BBS_CARNIVAL
NETMAIL
This would effectively exclude all tabulation of BAD_MSG, BBS_CARNIVAL and
NETMAIL tags when SETR prepares it's output report (SETR.RPT).
SETR can also use a "Tag Inclusion File" to include the echo tags in the
report. This file is a plain text file that you can create with any text
editor. It contains one echo tag that you want to include for each line of
the file. The lines in this file can be commented out by placing a ";" in
column 1 of that line. There is a 1000 uncommented line limit on the
inclusion list, and if the 1000 line limit is exceeded, SETR will report
the error, but complete the processing using the first 1000 lines only.
Any areatag not listed in the inclusion file will not be reported!
Example SETR.ICL contains:
RENEGADE_BBS
This would effectively exclude all tabulation of all traffic except that in
RENEGADE_BBS when SETR prepares it's output report (SETR.RPT).
/Ifilename<.ext> Option
-----------------------
The /I switch tells SETR to read a tag inclusion file. This can contain
the full name of a file in the current directory, or the complete path and
name to the inclusion list file. When used, the file named must exist, and
contain at least 1 uncommented line, or SETR will error out and abort the
processing. If no .ext is given, .ICL will be used! The /I option cannot
be used with the /X option or the /Z option!
If the /I option is used, the file named MUST exist or SETR will abort!
/Xfilename<.ext> Option
-----------------------
The /X switch tells SETR to read a tag exclusion file. This can contain
the full name of a file in the current directory, or the complete path and
name to the exclusion list file. When used, the file named must exist, and
contain at least 1 uncommented line, or SETR will error out and abort the
processing. If no .ext is given, .XCL will be used! The /X option cannot
be used with the /I option or the /Y option!
If the /X option is used, the file named MUST exist or SETR will abort!
Using the History Reporting Feature
-----------------------------------
SETR will create three history files for each report being processed when
the history updating is turned on. These files are named SQHIST.DTE,
SQHIST.TAG, and SQHIST.ORG by default. The default report is named
SQHIST.RPT. During the processing, SETR adds the current log's activity to
the history files, sorts, and consolidates the history files. When a
History Report is requested, SETR scans the history file and produces the
report showing all traffic up to the last log scanned.
The History Report is identical to the Daily Report, except that it
consolidates the reports from the beginning to the end of the history
period into a single report. This eliminates the need to keep the logs
around in order to produce a consolidated report at the end of the week, or
the end of the month, and the history files are much smaller in size than
having a weeks or months worth of logs stored on the disk.
/HU Switch
----------
The /HU switch tells SETR to create/update the history files during the
processing of the log file being scanned. The history files are updated
and sorted, but no report is created unless the /HR switch is also present.
WARNING! Scanning the same log file twice with the /HU switch will cause
SETR to add the same information to the history files twice, and result in
history reports that are useless!
/HR Switch
----------
The /HR switch tells SETR to produce a History Report from the history data
files. This can be used at any time to get the current history report if
needed. No files are deleted, but if there is an older history report in
the directory, it will be overwritten. SETR must have been run at least
once with the /HU switch for a report to be generated.
/HK Switch
----------
The /HK switch tells SETR to delete the history data files after the
current processing is completed. This switch was added to simplify the
maintenance of the history data files.
If any fatal error occurs, the history files will not be deleted!
/HA Switch
----------
The /HA switch tells SETR to APPEND the current history report to the
existing history report file rather than overwriting the old report. This
can be handy for making a running history report of the traffic on your
system.
HST= Option
-----------
HST=filename(no ".ext") will make SETR use a different filename for it's
history files, thus allowing you to maintain history files for each net
that your system processes, or to keep weekly or monthly history files with
ease. This is the base filename, and cannot contain an extension! It can
however contain a path as long as it includes the base filename like this:
SETR HST=C:\SQ\HISTDATA\FIDONET
The above example would cause SETR to create the history report
FIDONET.RPT, and the FIDONET.DTE, FIDONET.TAG, and FIDONET.ORG history
files in the HISTDATA sub directory of C:\SQ.
WARNING! The directory must already exist!
/Yfilename Option
-----------------
The /Y option is actually a combination of the /I option, and the HST=
option. The difference is that you only supply the basename of the tag
inclusion file, and SETR will use the same basename for its history files
as well. This will make it very easy for you to produce and maintain your
reports and history files by network. This can contain the basename of a
file in the current directory, or the complete path and basename to the tag
inclusion file and history files to be used. Once again, the tag inclusion
file named must exist and contain at least 1 uncommented line and must have
a .ICL extension for SETR to complete the processing.
If the /Y option is used, the inclusion file named MUST exist or SETR will
abort!
/Zfilename Option
-----------------
The /Z option is actually a combination of the /X option, and the HST=
option. The difference is that you only supply the basename of the tag
exclusion file, and SETR will use the same basename for its history files
as well. This will make it very easy for you to produce and maintain your
reports and history files by network. This can contain the basename of a
file in the current directory, or the complete path and basename to the tag
exclusion file and history files to be used. Once again, the tag exclusion
file named must exist and contain at least 1 uncommented line and must have
a .XCL extension for SETR to complete the processing.
If the /Z option is used, the exclusion file named MUST exist or SETR will
abort!
Making Network Reports
----------------------
To produce a network report is not that difficult using SETR and the
switches and options provided. Let's say that you run 3 nets on your
system: FidoNet, ITCNet, and RGSNet. Step one to creating network based
reports and history files is to create a FIDONET.XCL, ITCNET.XCL, and
RGSNET.XCL file in the directory where you will be doing the reports, or
another location on your system. The FIDONET.XCL file would contain all of
the AreaTags from the ITCNet and RGSNet portion of your SQUISH.CFG file,
and the ITCNET.XCL would contain all of the FidoNet and RGSNet Areatags
from your SQUISH.CFG file, and so on for the RGSNET.XCL.
Next, each day when you do your reports, you would run SETR three times
like so:
SETR RPT=FNDAILY.RPT /ZFIDONET /HU /HR
SETR RPT=INDAILY.RPT /ZITCNET /HU /HR
SETR RPT=RNDAILY.RPT /ZRGSNET /HU /HR
or:
SETR RPT=FNDAILY.RPT /XFIDONET.XCL HST=FIDONET /HU /HR
SETR RPT=INDAILY.RPT /XITCNET.XCL HST=ITCNET /HU /HR
SETR RPT=RNDAILY.RPT /XRGSNET.XCL HST=RGSNET /HU /HR
or:
SETR RPT=FNDAILY.RPT /XFIDONET HST=FIDONET /HU /HR
SETR RPT=INDAILY.RPT /XITCNET HST=ITCNET /HU /HR
SETR RPT=RNDAILY.RPT /XRGSNET HST=RGSNET /HU /HR
All of the examples would produce the exact same results, and illustrate
how the /Z option saves work on the command line. Any other desired
switches could be added for the options that you want, but the results of
the above commands would create your Daily Traffic Reports for each
network, plus a History Report for each network named, ie: FIDONET.RPT,
ITCNET.RPT, and RGSNET.RPT. There would also be a NETWORK.DTE,
NETWORK.TAG, and NETWORK.ORG history file created/updated for each of the
three networks listed above. On the last day of the reporting period,
weekly or monthly (whichever you decide to use), you would add the /HK
switch to all 3 of the above commands to delete the history files after
processing, and you would be all set for the next reporting period. Just
remember to rename or move the *.RPT files out of the way before starting
the new reporting period.
If you wanted your reports and history files in a sub directory, then the
following example could be used:
SETR RPT=C:\SQ\REPORTS\FNDAILY.RPT /ZC:\SQ\REPORTS\FIDONET /HU /HR
SETR RPT=C:\SQ\REPORTS\INDAILY.RPT /ZC:\SQ\REPORTS\ITCNET /HU /HR
SETR RPT=C:\SQ\REPORTS\RNDAILY.RPT /ZC:\SQ\REPORTS\RGSNET /HU /HR
or:
SETR RPT=C:\SQ\REPORTS\FNDAILY /ZC:\SQ\REPORTS\FIDONET /HU /HR
SETR RPT=C:\SQ\REPORTS\INDAILY /ZC:\SQ\REPORTS\ITCNET /HU /HR
SETR RPT=C:\SQ\REPORTS\RNDAILY /ZC:\SQ\REPORTS\RGSNET /HU /HR
The examples above will produce all of the reports and history files in the
C:\SQ\REPORTS directory, but you will have to make sure that you create the
three exclusion list files in that directory before running SETR this way.
Acknowledgements
----------------
Bob Lotspeich, 1:265/124, for being such a great beta tester and document
proofreader.
Joe Negron, 1:278/216, for some coding used in the registration routines,
and for catching a nasty little bug in the daily reporting routine that I
had overlooked.
R.J. Ross, 1:134/75, David Laurent, 2:322/10, Bob Rakov, 1:203/53, for
their programs that inspired me to write this one.
Registration
------------
SETR is not free, nor is SETR crippled to force registration. SETR is
fully functional, and will always remain so. The registered copies have no
unregistered message.
Why register? Besides a clear conscience, you will get a registration key
that will work for all future versions of SETR, and will remove the
Unregistered message on the SETR status screen.
The registration fee for your unique code is $5 for a non-commercial BBS.
The registration fee for a commercial BBS, defined if you run your BBS in
the course of a commercial business, is $10. Contact me at one of the
addresses below for site licensing information. Please print the file
REGISTER.FRM and fill it out.
Comments and suggestions for improvement will always be accepted, and
should be sent to me at 1:2215/118 or via snail mail at the address below:
Don Ludington
113 Palmetto Ave.
Akron, OH 44301